package com.inventory.api.service;

import com.inventory.api.dao.StockCheckOrderDao;
import com.inventory.api.entity.StockCheckOrder;
import com.inventory.api.signUpReq.StockCheckSignUpReq;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by lihu on 2018/2/2.
 */
@Service
public class StockCheckOrderServiceImpl implements StockCheckOrderService {

    @Autowired
    StockCheckOrderDao stockCheckOrderDao;

    @Autowired
    StockCheckService stockCheckService;


    @Override
    @Transactional
    public void StockCheckOrder(StockCheckSignUpReq signupReq) {
        /**
         * 添加盘库记录
         */
        StockCheckOrder order = new StockCheckOrder(signupReq);
        stockCheckOrderDao.save(order);
        stockCheckService.StockCheck(signupReq);
    }
}
